Programming Collective Intelligence by Toby Segaran

Programming Collective Intelligence by Toby Segaran

Author:Toby Segaran [Toby Segaran]
Language: eng
Format: epub
Tags: COMPUTERS / Intelligence (AI) & Semantics
ISBN: 9780596158422
Publisher: O'Reilly Media
Published: 2008-12-16T16:00:00+00:00


Figure 7-7. Decision tree model of hotness

The central node at the top that divides the dataset the best is gender. The remainder of the tree is actually quite complicated and difficult to read. However, you can certainly use it to make predictions about previously unseen people. Also, because the algorithms support missing data, you can aggregate people across large variables. For example, maybe you want to compare the hotness of everyone in the South against everyone in the Mid-Atlantic:

>>>south=treepredict2.mdclassify((None,None,'South'),hottree) >>> midat=treepredict2.mdclassify((None,None,'Mid Atlantic'),hottree) >>> south[10]/sum(south.values( )) 0.055820815183261735 >>> midat[10]/sum(midat.values( )) 0.048972797320600864

For this dataset, there are slightly more super-hot people in the South. You can try other things like considering age groups, or testing whether men get better scores than women.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.